package cn.liontalk.ChainResponsibilityPattern.customer;

import cn.liontalk.ChainResponsibilityPattern.factory.PriceHandlerFactory;
import cn.liontalk.ChainResponsibilityPattern.hander.PriceHandler;

import java.util.Random;

/**
 * @author: 周哲
 * @package: cn.liontalk.ChainResponsibilityPattern.customer
 * @description:
 * @date: 2019/1/9 20:16
 * @version: V1.0
 */
public class Customer {

    private PriceHandler priceHandler;

    public void setPriceHandler(PriceHandler priceHandler) {
        this.priceHandler = priceHandler;
    }

    public void requestDiscount(float discount) {
        priceHandler.processDiscount(discount);
    }



}
